package com.kotlin.jetpack.android.jssdk

import android.app.Activity
import android.webkit.WebView

/**
 * 创建者: zl
 * 创建时间: 2020/5/18 2:13 PM
 * 描述:
 */
class JSNativeSDK {
    private var sdkWarp: SDKWarp? = null

    fun getSDK(): SDKWarp? {
        return if (sdkWarp != null) {
            sdkWarp
        } else null
    }

    constructor(context: Activity, webView: WebView) {
        sdkWarp = SDKWarp(context, webView)
        webView.addJavascriptInterface(sdkWarp, "mtime")
    }
}